#define _CRT_SECURE_NO_WARNINGS 1

//struct ListNode {
//     int val;
// struct ListNode *next;
// };
// 
//typedef struct ListNode ListNode;
//struct ListNode* removeElements(struct ListNode* head, int val) {
    /*ListNode* newhead, * newptail, * pcur;
    newhead = newptail = NULL;
    pcur = head;
    while (pcur)
    {
        if (pcur->val != val)
        {
            if (newhead == NULL)
            {
                newhead = newptail = pcur;
            }
            else
            {
                newptail->next = pcur;
                newptail = newptail->next;
            }
        }
        pcur = pcur->next;
    }
    if (newhead)
        newptail->next = NULL;
    return newhead;
}*/